package com.sansan.qiangji.mapper.base;

import com.sansan.qiangji.entity.base.Product;
import com.sansan.qiangji.entity.base.example.ProductExample;
import com.sansan.qiangji.form.base.ProductListForm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper {
    int updateProducts(@Param("products") List<Product> products);

    List<Product> selectProducts(@Param("products") List<Product> products);

    int insertProducts(@Param("products") List<Product> products);

    List<Product> findByProductCodeOrProductName(@Param("productCode") String productCode, @Param("productName") String productName);
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product
     *
     * @mbg.generated Tue Nov 03 19:05:09 CST 2020
     */
    long countByExample(ProductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product
     *
     * @mbg.generated Tue Nov 03 19:05:09 CST 2020
     */
    int deleteByExample(ProductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product
     *
     * @mbg.generated Tue Nov 03 19:05:09 CST 2020
     */
    int deleteByPrimaryKey(Integer productId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product
     *
     * @mbg.generated Tue Nov 03 19:05:09 CST 2020
     */
    int insert(Product record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product
     *
     * @mbg.generated Tue Nov 03 19:05:09 CST 2020
     */
    int insertSelective(Product record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product
     *
     * @mbg.generated Tue Nov 03 19:05:09 CST 2020
     */
    List<Product> selectByExample(ProductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product
     *
     * @mbg.generated Tue Nov 03 19:05:09 CST 2020
     */
    Product selectByPrimaryKey(Integer productId);
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product
     *
     * @mbg.generated Tue Nov 03 19:05:09 CST 2020
     */
    int updateByExampleSelective(@Param("record") Product record, @Param("example") ProductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product
     *
     * @mbg.generated Tue Nov 03 19:05:09 CST 2020
     */
    int updateByExample(@Param("record") Product record, @Param("example") ProductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product
     *
     * @mbg.generated Tue Nov 03 19:05:09 CST 2020
     */
    int updateByPrimaryKeySelective(Product record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product
     *
     * @mbg.generated Tue Nov 03 19:05:09 CST 2020
     */
    int updateByPrimaryKey(Product record);

    List<Product> selectListCondition(ProductListForm form);
}
